/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.iss.foodbasket.service;

import javax.ejb.EJB;
import javax.ws.rs.Path;
import com.iss.foodbasket.bizLogic.CustomerService;
import com.iss.foodbasket.bizLogic.HashedPasswordGenerator;
import com.iss.foodbasket.models.Users;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;

/**
 *
 * @author A0109314N
 */
@Path("/User")
public class CustomerWebService {

    @EJB
    CustomerService cuservice;

    @Path("/register")
    @POST
    @Consumes("application/json")

    public boolean registercustomer(Users u) {

        boolean result = cuservice.registerCustomer(u);
        if (result == true) {
            System.out.println("Created");
            return result;
        } else {
            System.out.println("Problem");
            return result;
        }

    }

//    @Path("/login")
//    @POST
//    @Consumes("application/json")
//    public boolean LoginUser(Users u) 
//    {
//       String userid=u.getUserID().toString();
//       boolean result=cuservice.checkUser(userid);
//       if(result)
//        
//    }

}
